﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Com.OpenCode.DwgConvert.Model
{
    /// <summary>
    /// 数据转换任务取消异常
    /// </summary>
    public class ConvertAbortException : Exception
    {
        /// <summary>
        /// 返回消息
        /// </summary>
        private string message = "";

        public ConvertAbortException(IDataConvert dataConvert)
        {
            DataConvert = dataConvert;
            if (dataConvert != null)
            {
                message = string.Format("任务({0})已经取消", dataConvert.Name);
            }
        }

        public IDataConvert DataConvert { get; }

        public override string Message
        {
            get
            {
                return message;
            }
        }
    }
}
